﻿using Abp.BackgroundJobs;
using Abp.Dependency;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AVIS.OutBound.WizardAgent.Helpers
{
    /// <summary>
    /// Wizard接口日志帮助类
    /// </summary>
    public sealed class WizardLogHelper
    {
        /// <summary>
        /// 插入Wizard接口调用的监控日志
        /// </summary>
        public static void AddWizardMonitorLog(bool isCache, double seconds, string requestXml)
        {
            var args = new AddWizardMonitorLogJobArgs
            {
                isCache = isCache,
                seconds = seconds,
                requestXml = requestXml
            };

            var _backgroundJobManager = IocManager.Instance.Resolve<IBackgroundJobManager>();
            _backgroundJobManager.Enqueue<AddWizardMonitorLogJob, AddWizardMonitorLogJobArgs>(args);
        }
    }
}
